<template>
  <el-upload
      class="upload-demo"
      drag
      action=""
      multiple
      :auto-upload="false"
        ref="file"
      :on-change="getFile"
  >
    <el-icon class="el-icon--upload"><upload-filled /></el-icon>
    <div class="el-upload__text">
      拖拽到此处或 <em>点击上传</em>
    </div>
  </el-upload>
</template>
<script setup>

import {UploadFilled} from "@element-plus/icons-vue";
import {ref} from "vue";

const getFile=( uploadFile, uploadFiles)=>{
  files.value.push(uploadFile.raw)
  emits("batchImport",files.value)

}
const emits = defineEmits(['batchImport']);
const  upload=()=>{
}
const file=ref()
const rest=()=>{
  files.value=[]
  file.value.clearFiles()
}
defineExpose({ rest })

const files= ref([])
</script>
<style scoped>

</style>